package com.pmcc.core.service;

import com.pmcc.core.entity.Question;
import com.pmcc.core.repository.QuestionRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by spurs on 2018/11/15.
 */
@Service
@Transactional
public class QuestionService {
    @Autowired
    QuestionRepository questionRepository;

    /**
     * 查询问题列表
     */
    public List<Question> queryToCombo() {
        List<Question> aList = questionRepository.findAll();
        if (aList.size()>0){
            return aList;
        }
        return null;
    }
}
